﻿<UserControl x:Class="Flux.Editor.Controls.ImageButton"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300"
             Name="ImageButtonUserControl">
    <Grid>
        <Button>
            <StackPanel Orientation="Horizontal" Margin="4">
                <Image Source="{Binding ElementName=ImageButtonUserControl, Path=Image, UpdateSourceTrigger=PropertyChanged}"
                       Width="{Binding ElementName=ImageButtonUserControl, Path=ImageWidth, UpdateSourceTrigger=PropertyChanged}"
                       Height="{Binding ElementName=ImageButtonUserControl, Path=ImageHeight, UpdateSourceTrigger=PropertyChanged}"/>
                <TextBlock Text="{Binding ElementName=ImageButtonUserControl, Path=Text, UpdateSourceTrigger=PropertyChanged}" Margin="4,0,0,0"/>
            </StackPanel>
        </Button>
    </Grid>
</UserControl>
